import Vue from 'vue'
import VueRouter from 'vue-router'
import Login from '../views/Login.vue'

Vue.use(VueRouter)

  const routes = [
  {
    path: '/',
    name: 'Login',
    component: Login
  },
  {
    path: '/Manage',
    name: 'Manage',
    // route level code-splitting
    // this generates a separate chunk (about.[hash].js) for this route
    // which is lazy-loaded when the route is visited.
    component: () => import(/* webpackChunkName: "Manage" */ '../views/Manage/Manage.vue'),
    children:[
      {
        path:"/department",
        name:"department",
        component: () => import(/* webpackChunkName: "department" */ '../views/Manage/Content/System/Department.vue'),
      },
      {
        path:"/employee",
        name:"employee",
        component: () => import(/* webpackChunkName: "employee" */ '../views/Manage/Content/System/Employee.vue'),
      },
      {
        path:"/permission",
        name:"permission",
        component: () => import(/* webpackChunkName: "permission" */ '../views/Manage/Content/System/Permission.vue'),
      },
      {
        path:"/roles",
        name:"roles",
        component: () => import(/* webpackChunkName: "roles" */ '../views/Manage/Content/System/Roles.vue'),
      },
    ]
  }
]

const router = new VueRouter({
  routes
})

export default router
